<?php if(count($project_list)>0):?>
	<h3><?php echo $sf_user->getUserName() ?>'s projects</h3>
	<table class="tab1" cellspacing="0">
		<thead>
		<th width="120px">&nbsp;</th>
		<th>Project Name</th>
		<th>Owner</th>
	</thead>
	<tfoot>
	<th>&nbsp;</th>
	<th>Project Name</th>
	<th>Owner</th>
	</tfoot>
	<tr class="tab1-line tab1-even">
		<td>
			<button onclick = "openImportDialog('<?php echo url_for('importMedia/index') ?>')" title="Import project" class="addButton roundedCorner baseButton"></button>
		</td>
		<td></td>
	</tr>
	<?php if(!empty($project_list)):?>
		<?php
		$i = 1; // counter to change the background of lines
		$class;	// line's class
		?>
		<?php foreach($project_list as $project): ?>
		<?php
			if ($i % 2 == 0) {
				$class = 'even';
			} else {
				$class = 'odd';
			} // if
			$i++;
		?>
		<tr class="tab1-line tab1-<?php echo $class ?>Line">
				<td>
					<div class="actions">
						<a title="Open this project" href="<?php echo url_for('main/openProject?id='.$project->getId()) ?>">
							<button class="openButton roundedCorner baseButton"></button>
						</a>
						 <a title="Get project first media file" 
							href="#" onclick="showExportPopup(<?php echo $project->getId()?> , '<?php echo $project->getName()?>' , '<?php echo url_for('exportToLuna/getFirstMediaFile') ?>','Get  <?php echo $project->getName()?> First MEDIA file' )">
							<button class="scriptButton roundedCorner baseButton"></button>
						</a> 
						<a title="Delete this project" href="<?php echo url_for('main/deleteProject?id='.$project->getId()) ?>"
							onclick="return confirm('Do yo really want to delete this project ?')">
							<button class="deleteButton roundedCorner baseButton"></button>
						</a>
					</div>        
				</td>
				<td><?php echo $project->getName(); ?></td>
				<td><?php echo $project->getUserName() ?></td>
			</tr>
		<?php endforeach; ?>
	<?endif; ?>
	</table>
<?php  else :?>
	<h3>No project </h3>
<?php endif;?>